<?php $this->load->view('admin/header_layout'); ?>

<div class="content-inner">
    <div class="marg20-btm">
        <?php echo anchor('admin/topic', 'View All Topic', 'class="btn btn-primary"') ?>
    </div>



    <?php echo form_open('', 'class="form-horizontal"'); ?>

    <?php
    $title = array(
        'name' => 'topic_title',
        'value' => $topic->topic_title,
        'id' => 'input01',
        'required' => '',
        'placeholder' => 'Title...',
        'class' => 'input-xlarge'
    );
    $content = array(
        'name' => 'topic_content',
        'value' => $topic->topic_content,
        'id' => 'input01',
        'required' => '',
        'placeholder' => 'Content...',
        'class' => 'input-xlarge'
    );
    $publish_dated = array(
        'name' => 'topic_dated',
        'value' => $topic->topic_dated,
        'id' => '',
        'required' => '',
        'placeholder' => 'Publish Date...',
        'class' => 'input-large'
    );
    $status = array(
        '' => '---select status---',
        '1' => 'Approved',
        '0' => 'Disapproved'
    );
    ?>

    <div class="control-group">

        <?php
        echo '<div class="controls">
		   <span style="color:red;">' . validation_errors('&times;') . '</span>
		   </div>';
        ?>
        <div class="control-group">
            <label class="control-label" for="input01">Title </label>
            <div class="controls">
                <?php echo form_input($title); ?>
            </div>
        </div>

        <div class="control-group">
            <label class="control-label" for="input01">Content </label>
            <div class="controls">
                <?php echo form_textarea($content); ?>
            </div>
        </div>

        <label class="control-label" for="input01">Published </label>
        <div class="controls">
            <div class="input-append date" id="datepicker" data-date="2014-05-01" data-date-format="yyyy-mm-dd">
                <?php echo form_input($publish_dated); ?>
                <span class="add-on"><i class="icon-th"></i></span>
            </div>
        </div>
    </div>



    <div class="control-group">
        <label class="control-label" for="input01">Status </label>
        <div class="controls">
            <?php echo form_dropdown('Status', $status); ?>
        </div>
    </div>

    <div class="control-group">
        <label class="control-label" for="input01"></label>
        <div class="controls">
            <?php echo form_submit('btn_submit', 'Publish', 'class="btn btn-info"'); ?>
        </div>
    </div>


    <?php echo form_close(); ?>
</div>
</body>
</html>